1. Field of the Invention
The present invention relates to a USB controller and a buffer memory control method.
2. Description of Related Art
In recent years, a device (hereinafter referred to as USB device) in which a USB (Universal Serial Bus) is mounted has been broadly used. The USB device includes a personal computer, a printer, a digital camera, and a USB memory, for example. The USB device is connected to another USB device through a USB interface for performing data transfer complied with the USB standard. In the data transfer performed in the USB, one device functions as a host (personal computer or the like, for example) and the other device functions as a peripheral (peripheral device such as USB memory or the like). The data transferred between devices is temporarily stored in a buffer memory provided in a USB controller.
In the USB controller applied to an embedded device, a pipe region is allocated to a buffer memory, and the memory size of this pipe region varies according to the connected USB device, for example. Japanese Unexamined Patent Application Publication No. 2004-349836 (patent document 1) discloses a device which enables to change the divided blocks allocated by the pipe region. In a data transfer control device disclosed in the patent document 1, the buffer controller changes the address of the divided blocks provided in the packet buffer to the address corresponding to the allocation of the pipe region.